package java3_1;

import java.util.Scanner;

/**
 * 14:输入三个数，按照从小到大的顺序输出这三个数。
 */
public class homework14 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数：");
        double a = scanner.nextDouble();
        System.out.println("请输入第二个数：");
        double b = scanner.nextDouble();
        System.out.println("请输入第三个数：");
        double c = scanner.nextDouble();
        System.out.println((a<b?a:b)<c ? (a<b?a:b):c);//最小的数
        if (a>b){
            if (b>c){
                System.out.println(b);
            }else if (b<c&&a>c){
                System.out.println(c);
            }else {
                System.out.println(a);
            }
        }
        else {//(a<b)
            if (b<c){
                System.out.println(b);
            }else if (b>c&&a>c) {
                System.out.println(a);
            }else {
                System.out.println(c);
            }
        }
        System.out.println((a>b?a:b)>c ? (a>b?a:b):c);//最大的数
    }
}
